import { defineStore } from 'pinia'
import axios from '../utils/axios'

export const testStore = defineStore('test', {
  state: () => ({
    testStatu: 'test pre'
  }),
  actions: {
    async test() {
      console.log('test')

      const response = await axios.get('/gin/test/test1')
      const data = await response.json()
      return data
    },
    async test2() {
      console.log('test')

      // const response = await axios.post('http://192.168.2.166:11001/list', { keyword: '数据安全', page: 1 })
      // const data = await response.json()
      // return data
    },
    test1() {
      console.log('test1')
    }
  }

})
